手动安装
创建gbasedbt用户
GBase 8s数据库需要一个名为gbasedbt的操作系统用户,做为数据库的超级用户。我们在安装前,需要创建好这个用户。
检查gbasedbt用户是否存在:
[root@localhost ~]# cat /etc/passwd | grep gbasedbt
检查gbasedbt用户组是否存在:
[root@localhost ~]# cat /etc/group | grep gbasedbt
若系统不存在相关组及用户,则需要创建。以root用户登录系统,执行如下命令创建 gbasedbt 组和 gbasedbt 用户:
[root@localhost ~]# groupadd gbasedbt
[root@localhost ~]# useradd -g gbasedbt gbasedbt
执行如下命令为 gbasedbt 用户设置密码,建议设置相对复杂的密码:
[root@localhost ~]# passwd gbasedbt1234
创建安装目录
GBase 8s 数据库缺省的安装目录为 /opt/GBASE/gbase,您也可以自定义安装目录,安装目录必须为空。以缺省的安装目录为例,创建目录并修改属主为gbasedbt。
[root@localhost ~]# mkdir -p /opt/GBASE/gbase
[root@localhost ~]# chown gbasedbt:gbasedbt /opt/GBASE/gbase
上传并解压安装包
以GBase8sV8.8_AEE_3.5.1_3_6a4e30_RHEL6_x86_64.tar版本的安装包为例,将安装包文件复制到/opt目录下,并执行tar -vxf GBase8sV8.8_AEE_3.5.1_3_6a4e30_RHEL6_x86_64.tar 命令完成解压。
[root@localhost ~]# cd /opt
[root@localhost opt]# tar -vxf GBase8sV8.8_AEE_3.5.1_3_6a4e30_RHEL6_x86_64.tar
ids_install
onsecurity
doc/
ids.properties
.gbase.properties
执行安装
以 root 身份登录,进入解压目录,执行要安装的产品的安装脚本 ids_install,即可进行安装,具体命令如下:
[root@localhost /]# cd /opt
[root@localhost opt]# sh ids_install
执行安装过程中,安装程序先检查系统环境,如果系统没有安装JDK,那么安装包会先解压JDK,自动安装到系统中。如果已经安装,那么将显示产品的授权条款,回车依次查看全部的版权条款,最后确认是否接受这些版权条款。输入”Y”接受授权条款,按回车键即可继续。
具体安装过程示例如下:
[root@localhost opt]# sh ids_install
Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
Launching installer...
=========================================================================
GBase Software Bundle (created with InstallAnywhere)
-------------------------------------------------------------------------
Preparing CONSOLE Mode Installation...
=========================================================================
Getting Started
---------------
This application will guide you through the installation of GBase Software
Bundle.
Copyright General Data Corporation 2014, 2019. All rights reserved.
1. Release Notes
The Release Notes can be found in /opt/doc/ids_unix_relnotes_12.10.html.
2. Launch Information Center
Access the GBase Information Center at http://www.gbase.cn.
To Begin Installation, respond to each prompt to proceed to the next step in
the installation.
If you want to change something on a previous step, type 'back'.
You may cancel this installation at any time by typing 'quit'.
PRESS <ENTER> TO CONTINUE:
=======================================================================
License Agreement
-----------------
Installation and Use of GBase 8s Software Bundle Requires Acceptance of
the Following License Agreement:
Thank you for choosing GBase product!
Please read carefully the following licencing agreement before installing any
product: TIANJIN GENERAL DATA TECHNOLOGY CO. LTD. LICENSE AGREEMENT
READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL LICENSETERMS
(COLLECTIVELY "AGREEMENT") CAREFULLY BEFORE OPENING THE SOFTWAREMEDIA PACKAGE.
BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF THIS
AGREEMENT. IF YOU ARE ACCESSING THE SOFTWARE ELECTRONICALLY, INDICATE YOUR
ACCEPTANCE OF THESE TERMS. IF YOU DO NOT AGREE TO ALL THESE TERMS, PROMPTLY
RETURN THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND.
1. LICENSE TO USE. GeneralData grants you a non-exclusive and non-transferable
license for the internal use only of the accompanying software and
documentation and any error corrections provided by GeneralData(collectively
"Software"), by the number of users and the class of computer hardware for
which the corresponding fee has been paid.
2. RESTRICTIONS. Software is confidential and copyrighted. Title to Software
and all associated intellectual property rights is retained by GeneralData
and/or its licensors. Except as specifically authorized in any Supplemental
License Terms, you may not make copies of Software, other than a single copy
of Software for archival purposes. Unless enforcement is prohibited by
applicable law, you may not modify,decompile, or reverse engineer Software. You
acknowledge that Software is not designed, licensed or intended for use in the
design,construction, operation or maintenance of any nuclear facility.
GeneralData disclaims any express or implied warranty of fitness for such
uses.No right, title or interest in or to any trademark, service mark, logo or
trade name of GeneralData or its licensors is granted under this Agreement.
3. DISCLAIMER OF WARRANTY. Unless specified in this agreement, all express of
implied conditions, representations and warranties, including any implied
warranty of merchantability, fitness for aparticular purpose or
non-infringement are disclaimed, except to theextent that these disclaimers
are held to be legally invalid.
4. LIMITATION OF LIABILITY. To the extent not prohibited by law, in no event
will GeneralData or its licensors be liable for any lost revenue, profit or
data, or for special, indirect, consequential,incidental orpunitive damages,
however caused regardless of the theory of liability, arising out of or
related to the use of or inability to use software, even if GeneralData has
been advised of the possibility of such damages.In no event will GeneralData's
libility to you, whether incontract, tort (including negligence), or
otherwise, exceed the amount paid by you for Software under this Agreement.
The foregoing limitations will apply even if the above stated warranty fails
of itsessential purpose.
5. TERMINATION. This Agreement is effective until terminated. Youmay terminate
this Agreement at any time by destroying all copies of Software. This
Agreement will terminate immediately without noticefrom GeneralData if you
fail to comply with any provision of this Agreement.Upon Termination, you must
destroy all copies of Software.
6. EXPORT REGULATIONS. All Software and technical data delivered underthis
Agreement are subject to US export control laws and may be subject to export
or import regulations in other countries. You agree to comply strictly with
all such laws and regulations and acknowledge that you have the responsibility
to obtain such licenses to export,re-export, or import as may be required
after delivery to you.
7. CHINESE GOVERNMENT RESTRICTED. If Software is being acquired by or on behalf
of the Chinese Government , then the Government's rights in Software and
accompanying documentation will be only as set forth in this Agreement.
8. GOVERNING LAW. Any action related to this Agreement will be governed by
Chinese law: "COPYRIGHT LAW OF THE PEOPLE'S REPUBLIC OF CHINA","PATENT LAW OF
THE PEOPLE'S REPUBLIC OF CHINA","TRADEMARK LAW OF THE PEOPLE'S REPUBLIC OF
CHINA","COMPUTER SOFTWARE PROTECTION REGULATIONS OF THE PEOPLE'S REPUBLIC OF
CHINA". No choice of law rules of any jurisdiction will apply."
9. SEVERABILITY. If any provision of this Agreement is held to be
unenforceable, this Agreement will remain in effect with the provision
omitted, unless omission would frustrate the intent of the parties, inwhich
case this Agreement will immediately terminate.
10. INTEGRATION. This Agreement is the entire agreement between you and
GeneralData relating to its subject matter. It supersedes all prior or
contemporaneous oral or written communications, proposals,representations and
warranties and prevails over any conflicting or additional terms of any quote,
order, acknowledgment, or other communication between the parties relating to
its subject matter during the term of this Agreement. No modification of this
Agreement will be binding, unless in writing and signed by an authorize
depresentative of each party. When the translation document has the different
meaning or has the conflicting views with Chinese original text conflict,
should take the laws and regulations promulgation unit as well as the
Generaldata issue Chinese original text as the standard.
All trademarks and registered trademarks mentioned herein are the property of
their respective owners.
DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT? (Y/N): Y
- 指定安装路径。
根据界面提示输入安装路径 ,不输入直接回车则默认为/opt/GBASE/gbase。
=======================================================================
Installation Location
---------------------
Choose location for software installation
Default Install Folder: /opt/GBASE/gbase
ENTER AN ABSOLUTE PATH, OR PRESS <ENTER> TO ACCEPT THE DEFAULT:
- 选择安装类型,自定义安装输入 2 选择 Custom installation。
=========================================================================
Installation or Distribution
----------------------------
Select the installation type.
Typical: Install the database server with all features and a database server
that
is configured with default values. Includes:
** Client Software Development Kit (CSDK)
** Java Database Connectivity (JDBC)
Minimum disk space required: 700-800MB
Custom: Install the database server with specific features and software that
you need.
Optionally install a configured database server instance.
Minimum disk space required: 75 MB (without a server instance)
->1- Typical installation
2- Custom installation
3- Extract the product files (-DLEGACY option)
4- Create a RPM package for redistribution
ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT:: 2
- 选择自定义安装回车后,如下提示信息展示了选择或取消选择特定功能部件的操作方法,直接<回车>即可。
=========================================================================
"Choose Install Features" Help
------------------------------
On the next screen, type the number of a feature to change whether it is
selected or deselected. You can provide a list of numbers, separated by commas,
with no leading or trailing spaces.
For example, assume that the screen contains this list:
1- [X] ABC
2- [ ] XYZ
Please choose the Features to be installed by this installer.: ___
If you want to install both ABC and XYZ, type: 2
If you want to install only XYZ, type: 1,2
PRESS <ENTER> TO CONTINUE:
=========================================================================
- 如下展示了可供选择的功能部件列表。
输入1或者直接回车则默认安装所有的功能部件,输入2并回车则需按照步骤3中提示的操作方法选择自己所需的功能部件,选择完成后回车继续。
=========================================================================
Choose Install Set
------------------
=========================================================================
Choose Product Features
-----------------------
ENTER A COMMA_SEPARATED LIST OF NUMBERS REPRESENTING THE FEATURES YOU WOULD
LIKE TO SELECT, OR DESELECT. TO VIEW A FEATURE'S DESCRIPTION, ENTER
'<NUMBER>'. PRESS <RETURN> WHEN YOU ARE DONE:
1- [X] GBase database server
2- |-[X] Base Server
3- |-[X] Extensions and tools
4- |-[X] J/Foundation
5- |-[X] Database extensions
6- |-[X] Conversion and reversion support
7- |-[X] XML publishing
8- |-[X] Demonstration database scripts
9- |-[X] Enterprise Replication
10- |-[X] Data loading utilities
11- |-[X] onunload and onload utilities
12- |-[X] dbload utility
13- |-[X] Backup and Restore
14- |-[X] archecker utility
15- |-[X] ON-Bar utility
16- |-[X] Interface to Tivoli Storage Manager
17- |-[X] Administrative utilities
18- |-[X] Performance monitoring utilities
19- |-[X] Miscellaneous monitoring utilities
20- |-[X] Auditing utilities
21- |-[X] Database import and export utilities
22- |-[X] JSON Client Support
23- [X] Global Language Support (GLS)
24- |-[X] Chinese
Please choose the Features to be installed by this installer.:
=========================================================================
Feature review
--------------
Would you like to review the features that you have selected, or change which
features you have selected?
->1- Continue
2- Return to feature tree
ENTER THE NUMBER OF THE DESIRED CHOICE, OR PRESS <ENTER> TO ACCEPT THE
DEFAULT:
- 选择是否支持角色分离,若需要支持角色分离,则输入1后回车,默认不支持。
=========================================================================
Get Role Separation choice
--------------------------
Enable role separation for auditing procedures.
If you enable role separation, you can assign existing groups of users to
specific roles.
If you do not enable role separation, the database server administrator
performs all administration tasks.
1- Enable role separation
->2- Do not enable role separation
ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT::
- 选择是否在安装过程中自动创建实例。默认为2,不自动创建实例。
=========================================================================
Server Instance
---------------
Type 'back' to go to the previous step or 'quit' to cancel the installation.
Create a database server instance?
1- Yes - create a server instance
->2- No - do not create a server instance
ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT::
- 确认数据库安装信息正确无误后,回车开始安装。安装完成继续回车结束安装。
==========================================================================
Installation Summary
--------------------
Please review the following before continuing:
Product Name:
GBase Software Bundle
Install Folder:
/opt/GBASE/gbase
Product Features:
GBase database server,
Base Server,
Extensions and tools,
J/Foundation,
Database extensions,
Conversion and reversion support,
XML publishing,
Demonstration database scripts,
Enterprise Replication,
Data loading utilities,
onunload and onload utilities,
dbload utility,
Backup and Restore,
archecker utility,
ON-Bar utility,
Interface to Tivoli Storage Manager,
Administrative utilities,
Performance monitoring utilities,
Miscellaneous monitoring utilities,
Auditing utilities,
Database import and export utilities,
JSON Client Support,
Global Language Support (GLS),
Chinese
Disk Space Information (for Installation Target):
Required: 497,274,517 Bytes
Available: 9,861,873,664 Bytes
PRESS <ENTER> TO CONTINUE:
=========================================================================
Ready To Install
----------------
InstallAnywhere is now ready to install GBase Software Bundle onto your system
at the following location:
/opt/GBASE/gbase
PRESS <ENTER> TO INSTALL:
=========================================================================
Installing...
-------------
[==================|==================|==================|==============]
[------------------|------------------|------------------|--------------]
==========================================================================
Installation Complete
---------------------
Congratulations! GBase Software Bundle installation is complete.
Product install status:
GBase: Successful
GBase Connect: Successful
Main Version: GBase 8s V8.8
For more information about using GBase products, see the GBase Information
Center at http://www.gbase.cn.
PRESS <ENTER> TO EXIT THE INSTALLER:
创建和初始化实例
创建和初始化实例有两种方式,一种是使用脚本自动化创建及初始化实例,一种是手动创建及初始化实例。
脚本自动创建和初始化实例
安装完成后,在安装目录的etc目录下(例如以上安装示例中的/opt/GBASE/gbase/etc目录)包含初始化实例脚本 GBaseInit_gbasedbt.sh 。使用 gbasedbt 用户执行GBaseInit_gbasedbt.sh 脚本,自动创建并初始化实例。
[root@localhost gbase]# su gbasedbt
[gbasedbt@localhost gbase]$ sh GBaseInit_gbasedbt.sh
Initializing Program...OK
ENTER THE INSTANCE INFORMATION or PRESS <ENTER> TO ACCEPT THE DEFAULT.
// 创建实例名称,默认为 gbaseserver
ENTER GBASE INSTANCE NAME (GBASEDBTSERVER) [Default:gbaseserver]:
//选择安装目录。默认为 /opt/GBASE/gbase
SEARCHING FOR GBASE INSTALL FOLDER, PLEASE WAIT FOR SECONDS...
GBASE INSTALL FOLDER LIST:
1) /opt/GBASE/gbase
CHOOSE GBASE INSTALL FOLDER(GBASEDBTDIR) [Default:/opt/GBASE/gbase]:
//选择本机 IP 地址
CHOOSE SERVICE IP ADDRESS FROM THE LIST:
1) 192.168.127.101
2) 127.0.0.1
ENTER THE NUMBER FOR YOUR CHOICE [Default:192.168.127.101]:
//指定数据库的监听端口,缺省为 9088,可自定义端口
SPECIFY THE PORT NUMBER FOR GBASE [Default:9088]:
//选择初始化类型: 1 全部使用默认值 2 自定义安装
INITIALIZE TYPE:
1) TYPICAL -- Initialize the instance with all features configured with default values.
2) CUSTOM -- Initialize the instance with specific features that you need.
ENTER THE NUMBER FOR YOUR CHOICE [Default:1]: 2
//选择数据库字符集
GBASE CHARACTER SET LIST:
1) en_US.8859-1
2) zh_CN.GB18030-2000
3) zh_CN.utf8
ENTER THE NUMBER FOR YOUR CHOICE [Default:1]: 2
//输入数据库空间存储路径
ENTER THE DATA SPACE PATH [Default:/opt/GBASE/gbase/gbaseserver_dbs]:
//设置逻辑日志空间大小
ENTER THE LOGICAL LOG DBSPACE SIZE(MB) [Default:540]:
//设置物理日志空间大小
ENTER THE PHYSICAL LOG DBSPACE SIZE(MB) [Default:540]:
//设置智能大对象空间大小
ENTER THE SMART LOB DBSPACE SIZE(MB) [Default:138]:
//设置临时数据空间大小
ENTER THE TEMPORARY DBSPACE SIZE(MB) [Default:138]:
// 输入 Y 启动以上设置,N 重新进行配置
ENTER "Y" TO START DATABASE ADVANCED SETTINGS, OR ENTER "N" TO ACCEPT DEFAULT VALUES: [Default:Y]: Y
// 指示创建几个保存数据的数据库空间
ENTER THE NUMBER OF DATA DBSPACES [Default:1]:
// 指示创建几个保存临时数据的数据库空间
ENTER THE NUMBER OF TEMP DBSPACES [Default:1]:
// 是否启用GL_USEGLU,默认不启用
Enter "Y" TO ENABLE ENVIRONMENT GL_USEGLU, OR ENTER "N" TO DISABLE: [Default:N]:
//实例配置如下所示:
INSTANCE SUMMARY:
Instance name: gbaseserver
GBase install directory: /opt/GBASE/gbase
IP address & port: 192.168.127.101:9088
Character set: zh_CN.GB18030-2000
Logical log space size: 430 MB
Physical log space size: 430 MB
Smart LOB space size: 116 MB
Temp DBSpace size: 116 MB
Data path: /opt/GBASE/gbase/gbaseserver_dbs
Data path free size: 4292 MB
The number of data DBSpace: 1
The number of temp DBSpace: 1
Environment GL_USEGLU: 1
Enter "Y" to Start database initializing, or Enter "N" to Edit Again: Y
Touching Chunks...OK
Create sqlhosts File: /opt/GBASE/gbase/etc/sqlhosts.gbaseserver ...OK
Setting Parameters in /opt/GBASE/gbase/etc/onconfig.gbaseserver :
ROOTPATH.ROOTSIZE.DBSERVERNAME.FULL_DISK_INIT.SBSPACENAME.SYSSBSPACENAME.DBSPACETEMP.LOGFILES.MULTIPROCESSOR.VPCLASS.NETTYPE.CLEANERS.DEF_TABLE_LOCKMODE.DIRECT_IO.LOCKS.TAPEDEV.LTAPEDEV.CKPTINTVL.DS_MAX_QUERIES.DS_TOTAL_MEMORY.DS_NONPDQ_QUERY_MEM.PHYSBUFF.LOGBUFF.AUTO_TUNE.MSGPATH.SERVERNUM.ALLOW_NEWLINE.TEMPTAB_NOLOG.DUMPSHMEM.USEOSTIME.STACKSIZE.ON_RECVRY_THREADS.OFF_RECVRY_THREADS.USELASTCOMMITTED.SHMVIRTSIZE.SHMADD.GBASEDBTCONTIME.BUFFERPOOL2K.BUFFERPOOL16K...AUTO_CKPTS.OK
Initializing Root DBSpace & Share Memory...OK
Creating system database.......OK
Creating logical log Dbspace...OK
Creating physical log Dbspace...OK
Creating smart LOB Dbspace...OK
Creating temp Dbspace.1...OK
Creating data Dbspace.1...OK
Setting dbscheduler...OK
Moving physical log...OK
Adding 40 logical logs: 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34.35.36.37.38.39.40...OK
Setting data chunks extendable...OK
Cleaning logical logs in rootdbs.........OK
Database restarting.......OK
Creating database: gbasedb...OK
Now you can use this URL to connect to gbasedb:
jdbc:gbasedbt-sqli://192.168.8.123:9088/gbasedb:GBASEDBTSERVER=gbaseserver;
Version:
GBase Database Server -- On-Line -- Up 00:00:13 -- 1121592 Kbytes
Build Number: 3.5.1_3_6a4e30
GBase Initializing Finished!
Initialize log file : ./InitGBaseDB_202401081452.log
Press <ENTER> to Exit and Logout...
以上自动创建和初始化实例完毕,回车退出。
手动创建和初始化实例
您也可以按照如下步骤,手动创建实例并初始化。
(1)创建一个实例,假设其实例名为“gbaseserver”。
(2)创建一个实例需要配置以下三个文件,使用实例名作为文件的后缀,实例名为“gbaseserver”,则配置文件的名称如下:
- 环境变量文件名为 profile.gbaseserver
- 配置参数文件名称为 onconfig.gbaseserver
- sqlhosts 配置文件名称为 sqlhosts.gbaseserver
- 创建数据库的数据文件存储目录
以 root 身份登录,进入安装目录,创建数据目录,以 /dbs为例:
[root@localhost ~]# cd /opt/GBASE/gbase
[root@localhost gbase]# mkdir dbs
[root@localhost gbase]# chown gbasedbt:gbasedbt dbs(目录属主要改成gbasedbt)
[root@localhost gbase]# chmod 755 dbs(目录需要755权限)
[root@localhost gbase]# cd dbs
[root@localhost dbs]# touch rootdbs
[root@localhost dbs]# chown gbasedbt:gbasedbt rootdbs
[root@localhost dbs]# chmod 660 rootdbs
- 配置profile.gbaseserver环境变量文件
切换到 gbasedbt 用户身份登录,将默认环境变量 .bash_profile 文件复制一份,命名为 profile.gbaseserver,修改文件信息并保存。
[root@localhost dbs]# su gbasedbt
[gbasedbt@localhost ~]$ cd /home/gbasedbt
[gbasedbt@localhost ~]$ cp .bash_profile profile.gbaseserver
[gbasedbt@localhost ~]$ vi profile.gbaseserver //修改环境变量文件
(进入文件后按“i”建,开启 insert 模式)
注意:根据实例的实际信息需要更改部分字段信息
export GBASEDBTSERVER=gbaseserver //实例名,根据实际情况修改
export GBASEDBTDIR=/opt/GBASE/gbase //安装路径,根据实际情况修改
export ONCONFIG=onconfig.gbaseserver //配置参数文件名称,根据实际情况修改
export GBASEDBTSQLHOSTS=$GBASEDBTDIR/etc/sqlhosts.gbaseserver //sqlhosts 文件路径,根据实际情况修改
export PATH=$GBASEDBTDIR/bin:$GBASEDBTDIR/sbin:/usr/bin:${PATH}:. //需要添加数据库的bin,sbin目录
export GL_DATE="%iY-%m-%d"
export DATETIME="%iY-%m-%d %H:%M:%S"
export DB_LOCALE=zh_cn.GB18030-2000
export CLIENT_LOCALE=zh_cn.GB18030-2000
export LD_LIBRARY_PATH=${GBASEDBTDIR}/lib:${GBASEDBTDIR}/lib/esql:${GBASEDBTDIR}/lib/cli
export TERM=vt100
export TERMCAP=$GBASEDBTDIR/etc/termcap
export GBASEDBTTERM=termcap
export DBTEMP=$GBASEDBTDIR/tmp
执行如下命令,使环境变量生效:
[gbasedbt@localhost ~]$ source profile.gbaseserver
为了 gbasedbt 用户在登录后自动应用这些环境变量,可执行vi .bash_profile命令修改该文件,将source /home/gbasedbt/profile.gbaseserver添加到文件末尾并保存,并执行source .bash_profile命令生效。
- 配置 onconfig.gbaseserver 参数文件
将 /opt/GBASE/gbase/etc/ 目录中的 onconfig.std 文档复制一份,命名为 $ONCONFIG 变量指定的名称 onconfig.gbaseserver。
[gbasedbt@localhost ~]$ cd /opt/GBASE/gbase/etc/
[gbasedbt@localhost etc]$ cp onconfig.std onconfig.gbaseserver
使用vi onconfig.gbaseserver 命令修改文件,修改以下参数配置并保存:
ROOTPATH /opt/GBASE/gbase/dbs/rootdbs //系统数据库文件存储空间路径,参照步骤 1 中的设置
SERVERNUM 1 //实例编号,多实例中每个实例编号要唯一
DBSERVERNAME gbaseserver //数据库服务器实例名称
TAPEDEV /dev/null //用于存储空间备份的磁带设备
LTAPEDEV /dev/null //用于逻辑日志备份的磁带的设备路径
- 配置 sqlhosts.gbaseserver 文件
将 /opt/GBASE/gbase/etc/ 目录中的 sqlhosts.std 文档复制一份,命名为 GBASEDBTDQLHOSTS 变量指定的名称 sqlhost.gbaseserver。
[gbasedbt@localhost ~]$cd /opt/GBASE/gbase/etc/
[gbasedbt@localhost etc]$ cp sqlhosts.std sqlhosts.gbaseserver
使用vi sqlhosts.gbaseserver命令修改文件,在文件末尾添加相关实例名、网络连接方式、IP 及端口号。示例如下,但请注意,相关实例名、网络连接方式、IP 及端口号需替换为数据库的实际安装信息。
实例名 网络连接方式 IP 端口
gbaseserver onsoctcp 192.168.127.101 9088
- 初始化数据库
使用 gbasedbt 用户执行初始化命令:
[gbasedbt@localhost ~]$ oninit -ivy